Component({
  properties:{
    signText: {            // 属性名
      type: String,
      value: '去签到'
    },
    investText:{
      type: String,
      value: '去出借'
    }

  },
  data:{
    isShow: false,
    signBackground: "#ff8c19",
    investBackground:"#ff8c19",
    signColor:"#ffffff",
    investColor:"#ffffff",
    signDisabled:false,
    investDisabled:false,
  },

  methods:{
    //显示弹窗
    showDialog:function(){
      var that = this;
      that.setData({
        isShow:true
      })
    },
    //隐藏弹窗
    hiddenDialog:function(){
      var that = this;
      that.setData({
        isShow: false
      })
    },
    // 改变去签到按钮背景颜色
    changeSignBackground:function(){
      var that=this;
      that.setData({
        signBackground:"#cccccc",
        signDisabled:true
      })
    },
     // 改变去出借按钮背景颜色
    changeInvestBackground: function () {
      var that = this;
      that.setData({
        investBackground: "#cccccc",
        investDisabled:true
      })
    },
    _signClick:function(){
      this.triggerEvent("signClick")
    },

    _investClick:function(){
      this.triggerEvent("investClick")
    },

    _close_alert:function(){
      this.triggerEvent("close_alert")
    }
  }
})